/*
 * @Descripttion:
 * @LastEditors: xueyc
 * @LastEditTime: 2024-08-16 23:11:50
 */
import Dile_Constants from '@/utils/constants/app'
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

/**
 * @Author: xzh
 * @Descripttion:固定路由：需声明guid为固定唯一值
 * @Param:
 */
export const constantRoutes: Array<RouteRecordRaw> = [
  {
    path: '/login',
    name: 'login',
    meta: {
      hidden: true,
      title: '登录'
    },
    component: () => import('@/views/login/index.vue')
  },
  {
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: Dile_Constants.sideBarMap.homePage,
    redirect: `/${Dile_Constants.sideBarMap.homePage}`,
    // redirect: `/afterSale`,
    children: []
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes: constantRoutes
})

export default router
